package com.rtx.wms.std.so.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.rtx.wms.std.so.bean.bak.ApiOrderdetailfinishBak;
import com.rtx.wms.std.so.bean.bak.ApiOrdersfinishBak;
import com.rtx.wms.std.so.mapper.bak.ApiOrderdetailfinishBakMapper;
import com.rtx.wms.std.so.mapper.bak.ApiOrdersfinishBakMapper;
import com.rtx.wms.std.so.service.ApiOrdersfinishBakService;

@Service
public class ApiOrdersfinishBakServiceImpl extends ServiceImpl<ApiOrdersfinishBakMapper, ApiOrdersfinishBak> implements ApiOrdersfinishBakService{

	@Autowired
	ApiOrdersfinishBakMapper apiOrdersfinishBakMapper;
	
	@Autowired
	ApiOrderdetailfinishBakMapper apiOrderdetailfinishBakMapper;
	
	@Override
	public void updateByWrapper(String whseid, LambdaUpdateWrapper<ApiOrdersfinishBak> wrapper) {
		
	}

	@Override
	public void addApiOrdersfinish(String whseid, ApiOrdersfinishBak o) {
		for(ApiOrderdetailfinishBak details:o.getDetails()) {
			apiOrderdetailfinishBakMapper.insert(details);
		}
		apiOrdersfinishBakMapper.insert(o);
	}
}
